package com.example.uit_management;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;
import android.widget.ImageButton;
import android.widget.Toast;

public class Menu_GridView extends Activity {

	static ProgressDialog dialog;
    @Override
    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.menu_gridview);
        // Thoi khoa bieu
        ImageButton ThoiKhoaBieu =(ImageButton)findViewById(R.id.GridView_ThoiKhoaBieu);
        ThoiKhoaBieu.setOnClickListener(ThoiKhoaBieu_Listener);
        // Diem So
        ImageButton DiemSo =(ImageButton)findViewById(R.id.GridView_DiemSo);
        DiemSo.setOnClickListener(DiemSo_Listener);
        // Dang ky mon hoc
        ImageButton Dangkymonhoc =(ImageButton)findViewById(R.id.GridView_Dangkymonhoc);
        Dangkymonhoc.setOnClickListener(Dangkymonhoc_Listener);
        // Thong tin
        ImageButton ThongTin =(ImageButton)findViewById(R.id.GridView_ThongTin);
        ThongTin.setOnClickListener(ThongTin_Listener);
        // Chuong trinh khung
        ImageButton ChuongTrinhKhung =(ImageButton)findViewById(R.id.GridView_ChuongTrinhKhung);
        ChuongTrinhKhung.setOnClickListener(ChuongTrinhKhung_Listener);
        // Lich thi
        ImageButton LichThi =(ImageButton)findViewById(R.id.GridView_LichThi);
        LichThi.setOnClickListener(LichThi_Listener);
        // Lich thi
        ImageButton LichThiCaNhan =(ImageButton)findViewById(R.id.GridView_LichThiCaNhan);
        LichThiCaNhan.setOnClickListener(LichThiCaNhan_Listener);
        // Lich hoc
        ImageButton LichHoc =(ImageButton)findViewById(R.id.GridView_LichHoc);
        LichHoc.setOnClickListener(LichHoc_Listener);
        // Chuong trinh khung
        ImageButton ChuongTrinhKhungCaNhan =(ImageButton)findViewById(R.id.GridView_ChuongTrinhKhungCaNhan);
        ChuongTrinhKhungCaNhan.setOnClickListener(ChuongTrinhKhungCaNhan_Listener);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity__score, menu);
        return true;
    }  
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
        case R.id.menu_back:{
        	finish();  
        	Intent intent = new Intent(getApplicationContext(),MainActivity.class);
				startActivity(intent);				
				break;
        	}
        }
        return true;
    }
    private OnClickListener ThoiKhoaBieu_Listener = new OnClickListener()
    {
        public void onClick(View v)
        {        	
        	dialog = ProgressDialog.show(Menu_GridView.this, "",
		                "Please wait for few seconds...", true);
        	finish();  
        	Intent intent = new Intent(getApplicationContext(),Activity_list_schedule_vs2.class);
          	startActivity(intent);
        	     	
        }
    }; 
    private OnClickListener DiemSo_Listener = new OnClickListener()
    {
        public void onClick(View v)
        {        	
        	dialog = ProgressDialog.show(Menu_GridView.this, "",
		                "Please wait for few seconds...", true);
        	finish();  
        	Intent intent = new Intent(getApplicationContext(),Activity_Score.class);
          	startActivity(intent);
        	     	
        }
    }; 
    private OnClickListener Dangkymonhoc_Listener = new OnClickListener()
    {
        public void onClick(View v)
        {        	
        	dialog = ProgressDialog.show(Menu_GridView.this, "",
		                "Please wait for few seconds...", true);
        	finish();  
        	Intent intent = new Intent(getApplicationContext(),Activity_list_registry_vs2.class);
          	startActivity(intent);
        	     	
        }
    }; 
    private OnClickListener ThongTin_Listener = new OnClickListener()
    {
        public void onClick(View v)
        {        	
        	dialog = ProgressDialog.show(Menu_GridView.this, "",
		                "Please wait for few seconds...", true);
        	finish();  
        	Intent intent = new Intent(getApplicationContext(),Activity_ImformationStudent.class);
          	startActivity(intent);
        	     	
        }
    }; 
    private OnClickListener ChuongTrinhKhung_Listener = new OnClickListener()
    {
        public void onClick(View v)
        {        	        	
        	dialog = ProgressDialog.show(Menu_GridView.this, "",
	                "Please wait for few seconds...", true);
        	finish();  
        	Intent intent = new Intent(getApplicationContext(),Activity_list_pattern.class);
	      	startActivity(intent);     	
        }
    }; 
    private OnClickListener ChuongTrinhKhungCaNhan_Listener = new OnClickListener()
    {
        public void onClick(View v)
        {        	        	
        	dialog = ProgressDialog.show(Menu_GridView.this, "",
	                "Please wait for few seconds...", true);
        	finish();  
        	Intent intent = new Intent(getApplicationContext(),Activity_list_pattern_IDStudent.class);
	      	startActivity(intent);     	
        }
    }; 
    private OnClickListener LichThi_Listener = new OnClickListener()
    {
        public void onClick(View v)
        {        	        	
        	dialog = ProgressDialog.show(Menu_GridView.this, "",
	                "Please wait for few seconds...", true);
        	finish();  
        	Intent intent = new Intent(getApplicationContext(),Activity_list_testschedule.class);
	      	startActivity(intent);     	
        }
    }; 
    private OnClickListener LichThiCaNhan_Listener = new OnClickListener()
    {
        public void onClick(View v)
        {        	        	
        	dialog = ProgressDialog.show(Menu_GridView.this, "",
	                "Please wait for few seconds...", true);
        	finish();  
        	Intent intent = new Intent(getApplicationContext(),Activity_list_testscheduleID.class);
	      	startActivity(intent);     	
        }
    }; 
    private OnClickListener LichHoc_Listener = new OnClickListener()
    {
        public void onClick(View v)
        {        	        	
        	dialog = ProgressDialog.show(Menu_GridView.this, "",
	                "Please wait for few seconds...", true);
        	finish();  
        	Intent intent = new Intent(getApplicationContext(),Activity_list_shedule_semester.class);
	      	startActivity(intent);      	
        }
    }; 
}
